<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?a7c05ce530152d9866930ef4850ee566"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <title>神奇的鸭鸭の码农库 | 新知识要不断的总结记录成笔记，要多写，多画，能够清晰透彻的将知识讲给别人听，才是达到理解的层次。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#765959">
    
    
    <meta name="keywords" content="">
    <meta property="og:type" content="website">
<meta property="og:title" content="神奇的鸭鸭の码农库">
<meta property="og:url" content="http://magic_duck.oschina.io/page/2/index.html">
<meta property="og:site_name" content="神奇的鸭鸭の码农库">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="神奇的鸭鸭の码农库">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.4.3">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">神奇的鸭鸭</h5>
          <a href="mailto:702038338@qq.com" title="702038338@qq.com" class="mail">702038338@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/magic_duck" target="_blank" >
                <i class="icon icon-lg icon-gg-circle"></i>
                码云
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.zhihu.com/people/shen-qi-de-ya-ya" target="_blank" >
                <i class="icon icon-lg icon-twitter"></i>
                知乎
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/404.html"  >
                <i class="icon icon-lg icon-link"></i>
                404页面测试
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">神奇的鸭鸭の码农库</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header index-header">

    <div class="container fade-scale">
        <h1 class="title">神奇的鸭鸭の码农库</h1>
        <h5 class="subtitle">
            
                新知识要不断的总结记录成笔记，要多写，多画，能够清晰透彻的将知识讲给别人听，才是达到理解的层次。
            
        </h5>
    </div>

    

</header>

<div class="container body-wrap">

    <ul class="post-list">
    
        <li class="post-list-item fade">
            <article id="post-java_enhance2_继承"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年10月23日 0:00" datetime="2017-10-22T16:00:00.000Z"  itemprop="datePublished">2017-10-23</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/10/23/java_enhance2_继承/">java提高篇(二) 理解java的三大特性之继承</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        学习来源：http://cmsblogs.com
继承继承是使用已存在的类定义作为基础建立新类的技术，新类的定义可以增加新的数据或新的功能，也可以使用基类的功能，但不能选择性的继承基类。通过使用继承我们能够非常方便的复用以前的代码，能够大大的提高开发的效率。
实际上继承者是被继承者的特殊化，它除了拥有被继承者的特性外，还拥有自己独有的特性。例如猫有抓老鼠这种其他动物没有的特性。同时在继承关系...
    

        <a href="/2017/10/23/java_enhance2_继承/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/java基础/">java基础</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-java_enhance1_封装"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年10月22日 0:00" datetime="2017-10-21T16:00:00.000Z"  itemprop="datePublished">2017-10-22</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/10/22/java_enhance1_封装/">java提高篇(一) 理解java的三大特性之封装</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        学习来源：http://cmsblogs.com
封装封装的目的是尽可能的隐藏内部细节，只保留一些对外接口使之与外部发生联系。专业点说就是封装给对象提供了隐藏内部特性和行为的能力。对象提供一些能被其他对象访问的方法来改变他的内部数据。在Java中有3中修饰符public,private和protected。每一种修饰符给其他的位于同一个包或者不同包下面的对象赋予了不同的访问权限。
下面列出使...
    

        <a href="/2017/10/22/java_enhance1_封装/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/java基础/">java基础</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年10月19日 0:00" datetime="2017-10-18T16:00:00.000Z"  itemprop="datePublished">2017-10-19</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/">腾讯云Centos7.2使用Docker搭建JavaWeb运行环境</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        最近完成了吐槽模块，打算放到服务器上展示展示。http://sqdyy.cn:8888/spitslot 听说现在都用Docker容器快速部署项目，今天就弄来简单玩一玩，也算入个门。
在centos上安装docker前置条件
64-bit 系统
kernel 3.10+s检查内核版本，返回值大于3.10即可1uname -r


确保yum是最新的1yum update
添加yum仓库123...
    

        <a href="/2017/10/19/cloud.tencent_Centos7.2_Install_Docker_JavaEnvironment/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/环境搭建/">环境搭建</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-redis4.4.0_primary_06"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月07日 2:00" datetime="2017-09-06T18:00:00.000Z"  itemprop="datePublished">2017-09-07</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/07/redis4.4.0_primary_06/">Jedis连接Reis集群</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        Jedis连接Redis集群在Redis基础入门的最后已经介绍了Jedis的基本使用，如单实例连接，连接池连接，已经简单的spring整合jedisPool。下面介绍Jedis连接Redis集群的代码。
创建JedisCluster类连接redis集群12345678910111213141516@Testpublic void JedisCluster() throws Exception...
    

        <a href="/2017/09/07/redis4.4.0_primary_06/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-redis4.4.0_primary_05"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月07日 1:00" datetime="2017-09-06T17:00:00.000Z"  itemprop="datePublished">2017-09-07</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/07/redis4.4.0_primary_05/">Redis集群</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        redis-cluster架构架构细节：

所有的redis节点彼此互联(PING-PONG机制)，内部使用二进制协议优化传输速度和带宽。
节点的fail是通过集群中超过半数的节点检测失效时才生效。
客户端与redis节点直连,不需要中间proxy层.客户端不需要连接集群所有节点,连接集群中任何一个可用节点即可。
redis-cluster把所有的物理节点映射到[0-16383]slot上,...
    

        <a href="/2017/09/07/redis4.4.0_primary_05/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-redis4.4.0_primary_04"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月06日 4:00" datetime="2017-09-05T20:00:00.000Z"  itemprop="datePublished">2017-09-06</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/06/redis4.4.0_primary_04/">Redis的主从复制</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        Redis的主从复制持久化保证了即使redis服务重启也不会丢失数据，因为redis服务重启后会将硬盘上持久化的数据恢复到内存中，但是当redis服务器的硬盘损坏了可能会导致数据丢失，如果通过redis的主从复制机制就可以避免这种单点故障，如下图：
说明：

主redis中的数据有两个副本(replication)即从redis1和从redis2，即使一台redis服务器宕机其他两台redi...
    

        <a href="/2017/09/06/redis4.4.0_primary_04/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-redis4.4.0_primary_03"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月06日 3:00" datetime="2017-09-05T19:00:00.000Z"  itemprop="datePublished">2017-09-06</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/06/redis4.4.0_primary_03/">Redis持久化方案</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        RDB持久化RDB是Redis默认采用的持久化方式。RDB方式的持久化是通过快照(snapshotting)完成的，当符合一定条件时Redis会自动将内存中的数据进行快照并持久化到硬盘中。
持久化条件配置12345678# redis.conf 默认配置# save开头的一行就是持久化配置，可以配置多个条件(每行配置一个条件)，每个条件之间是"或"的关系# 表示15分钟(900秒)内至少1个...
    

        <a href="/2017/09/06/redis4.4.0_primary_03/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-redis4.4.0_primary_02"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月06日 2:00" datetime="2017-09-05T18:00:00.000Z"  itemprop="datePublished">2017-09-06</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/06/redis4.4.0_primary_02/">Redis数据类型和命令</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        Redis数据类型redis基础入门中说过，目前为止Redis支持的键值数据类型如下：字符串类型，Hash散列类型，List列表类型，Set集合类型，SortedSet(Zset)有序集合类型，注意在redis中的命令语句中，命令是忽略大小写的，而key是不胡烈大小写的。
String类型基本命令：12345678910111213141516171819202122232425262728...
    

        <a href="/2017/09/06/redis4.4.0_primary_02/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-redis4.4.0_primary_01"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月06日 1:00" datetime="2017-09-05T17:00:00.000Z"  itemprop="datePublished">2017-09-06</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/06/redis4.4.0_primary_01/">Redis基础入门</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        Redis介绍什么是NoSql为了解决高并发，高科扩展，高可用，大数据存储问题而产生的数据库解决方案，就是NoSql数据库。NoSql泛指非关系型的数据库，NoSql即Not-Only SQL，它可以作为关系型数据库的良好补充。
NoSql数据库分类键值(Key-Value)存储数据库：

相关产品： Tokyo Cabinet/Tyrant、Redis、Voldemort、Berkeley...
    

        <a href="/2017/09/06/redis4.4.0_primary_01/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/缓存/">缓存</a></li></ul>

    </div>
    
</article>

        </li>
    
        <li class="post-list-item fade">
            <article id="post-Solr6.6.0_primary_01"
  class="article-card article-type-post" itemprop="blogPost">

    <div class="post-meta">
        <time class="post-time" title="2017年09月04日 16:05" datetime="2017-09-04T08:05:00.000Z"  itemprop="datePublished">2017-09-04</time>

        


        

    </div>

    


  
    <h3 class="post-title" itemprop="name">
      <a class="post-title-link" href="/2017/09/04/Solr6.6.0_primary_01/">全文检索技术Solr6.6.0</a>
    </h3>
  




    <div class="post-content" id="post-content" itemprop="postContent">

    
        Solr介绍Solr是Apache下的一个顶级开源项目，采用Java开发，它是基于Lucene的全文搜索服务器。Solr可以独立运行在Jetty、Tomcat等这些Servlet容器中。Solr提供了比Lucene更为丰富的查询语言，同时实现了可配置、可扩展，并对索引、搜索性能进行了优化。使用Solr进行创建索引和搜索索引的实现方法很简单，如下：
创建索引：客户端(可以是浏览器可以是Java...
    

        <a href="/2017/09/04/Solr6.6.0_primary_01/" class="post-more waves-effect waves-button">
            阅读全文...
        </a>
    </div>
    
    <div class="post-footer">
        
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/全文检索/">全文检索</a></li></ul>

    </div>
    
</article>

        </li>
    
    </ul>

    
<nav id="page-nav">
    <div class="inner">
    <a class="extend prev" rel="prev" href="/">上一页</a><a class="page-number" href="/">1</a><span class="page-number current">2</span><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><span class="space">&hellip;</span><a class="page-number" href="/page/8/">8</a><a class="extend next" rel="next" href="/page/3/">下一页</a>
    </div>
</nav>


</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://git.oschina.net/z77z" target="_blank">邹海清</a></span>
            <span>神奇的鸭鸭の码农库 &copy; 2017</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/page/2/&title=神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/page/2/&title=神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/page/2/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/page/2/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/page/2/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://magic_duck.oschina.io/page/2/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };



lazyScripts.push('//s95.cnzz.com/z_stat.php?id=1261081671&web_id=1261081671')

</script>

<script src="/js/main.min.js?v=1.4.3"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.4.3" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>


</body>
</html>
